# Maintainer: Chris Brannon <cmbrannon79@gmail.com>
# Contributor: Allan McRae <mcrae_allan@hotmail.com>
# Contributor: Philip Nilsson <leffeman@gmail.com>

pkgname=curlftpfs
pkgver=0.9.2
pkgrel=8
pkgdesc="A filesystem for acessing FTP hosts based on FUSE and libcurl."
url="http://curlftpfs.sourceforge.net/"
license=('GPL')
depends=('curl' 'fuse2' 'glib2')
arch=('loong64' 'x86_64')
source=(https://downloads.sourceforge.net/sourceforge/curlftpfs/$pkgname-$pkgver.tar.gz
        ioerror.patch no-verify-hostname.patch)
sha512sums=('df07c418d175f766c89525017fc56e79726061eee0c3a6607ded0e1bf24f64f1475ba0e546157b65892194e3c4414c120822bf8fb175437e68366f82de216067'
            '6d5454dc9b09279067028175458dd3dd1cecc7f99d11e2fe7048b9b9c31d9ed213ed916698f9311c5278e9389b4a53e0fde5fe735e613d80cbd6423041fe8122'
            '737db3bcd12ee04ef1d63e22ae97588f9ea0156ba425241ebf176a6437df474990e081f05c6656a6b02c93d41ce1e88b0beb805253f11c09de9d37892baedf56')

prepare() {
  cd $pkgname-$pkgver
  patch -p1 -i ../ioerror.patch
  patch -p1 -i ../no-verify-hostname.patch
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install 
}
